import React from "react";
import { Checkbox } from "antd-mobile";
import "./index.scss";
const YHAgreeItem = props => {
	const { children, onChange, className } = props;

	const onChangeHandle = e => {
		if (onChange) {
			onChange(e);
		}
	};
	return (
		<div className={`agreeItem-component ${className}`}>
			<Checkbox onChange={onChangeHandle}>
				<div className="text">{children}</div>
			</Checkbox>
		</div>
	);
};
export default YHAgreeItem;
